<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>


<body>
    <div id="box">
        <ul v-for="(item,index) in arr" :key="index">
            <li>
                <div>{{index}}</div>
                <div>{{item.name}}</div>
                <div>{{item.age}}</div>
            </li>
        </ul>
    </div>
    <script>
        const v_c = new Vue({
            el: '#box',
            data: {
                msg: 'v-for进行遍历',
                arr: [{
                    id: '01',
                    name: 'tom',
                    age: 18
                }, {
                    id: '02',
                    name: 'lisi',
                    age: 99
                }, {
                    id: '03',
                    name: 'zhangsan',
                    age: 100
                }]
            }
        })
    </script>
</body>

</html>